const express = require('express');
const router = express.Router();
router.get('/', (req, res) => {
    const content = [
        {
            id: 'bb7652a4-2f44-44b2-8215-f63f85ea9fac',
            month: '2020-4',
            country: 'China',
            dealerId: 'f6189016-93cb-4944-9b07-08d74c53a651',
            dealerCode: '13425',
            dealerName: 'TEST USER',
            partVariety: 11,
            stockVariety: 12,
            saleVariety: 13,
            stockAmount: 234.19,
            saleAmount: 51.15,
            stockSaleRatio: 4.58,
            sluggishVariety: 316,
            sluggishAmount: 11.7,
            stockOverVariety: 475,
            stockOverAmount: 15.61,
            submitSluggishVariety: 101,
            submitSluggishAmount: 112
        },
        {
            id: '7eb93b81-2524-4215-bb26-3ce1c4279e8b',
            month: '2020-3',
            country: 'China',
            dealerId: 'f6189016-93cb-4944-9b07-08d74c53a651',
            dealerCode: '13425',
            dealerName: 'TEST USER',
            partVariety: 10,
            stockVariety: 11,
            saleVariety: 12,
            stockAmount: 233.19,
            saleAmount: 50.15,
            stockSaleRatio: 3.58,
            sluggishVariety: 313,
            sluggishAmount: 8.7,
            stockOverVariety: 474,
            stockOverAmount: 14.61,
            submitSluggishVariety: 100,
            submitSluggishAmount: 111
        },
        {
            id: '1ad5f2b1-47fe-4514-9010-20d2b1d9485d',
            month: '2020-2',
            country: 'China',
            dealerId: 'f6189016-93cb-4944-9b07-08d74c53a651',
            dealerCode: '13425',
            dealerName: 'TEST USER',
            partVariety: 9,
            stockVariety: 10,
            saleVariety: 11,
            stockAmount: 232.19,
            saleAmount: 49.15,
            stockSaleRatio: 2.58,
            sluggishVariety: 310,
            sluggishAmount: 5.7,
            stockOverVariety: 473,
            stockOverAmount: 13.61,
            submitSluggishVariety: 90,
            submitSluggishAmount: 150
        },
    ];
    res.json({
        message: '',
        payload: content
    });
});

router.get('/type', (req, res) => {
    res.json({
        message: '',
        payload: [
            {
                id: 'bb7652a4-2f44-44b2-8215-f63f85ea9fac',
                month: '2020-4',
                country: 'China',
                stockAmount: 234.19,
                saleAmount: 51.15,
                stockSaleRatio: 4.58
            },
            {
                id: '7eb93b81-2524-4215-bb26-3ce1c4279e8b',
                month: '2020-3',
                country: 'China',
                stockAmount: 233.19,
                saleAmount: 50.15,
                stockSaleRatio: 3.58
            },
            {
                id: '1ad5f2b1-47fe-4514-9010-20d2b1d9485d',
                month: '2020-2',
                country: 'China',
                stockAmount: 232.19,
                saleAmount: 49.15,
                stockSaleRatio: 2.58
            }
        ]
    });
});

router.get('/rate', (req, res) => {
    res.json({
        message: '',
        payload: [
            {
                id: '7eb93b81-2524-4215-bb26-3ce1c4279e8b',
                month: '2020-3',
                country: 'China',
                variety: {
                    id: 'adc4652d-0544-4ba8-9875-a6646f03e5bd',
                    month: '2020-3',
                    sluggishVarietyN1: 157,
                    sluggishVarietyN2: 94,
                    sluggishVarietyN3: 62,
                    stockOverVariety: 474,
                    total: 787
                },
                sluggish: {
                    id: 'adc4652d-0544-4ba8-9875-a6646f03e5bd',
                    month: '2020-3',
                    sluggishAmountN1: 4.85,
                    sluggishAmountN2: 2.51,
                    sluggishAmountN3: 1.34,
                    stockOverAmount: 14.61,
                    total: 23.31
                }
            }
        ]
    });
});
module.exports = router;
